# Hero Lane Time-based Win Rate

> `GET /api/academy/heroes/{hero_identifier}/win-rate/timeline`: Academy endpoint of the Rone Arena API.

Retrieve time-based win rate statistics for a specific hero in a given lane. Supports query parameters for rank, pagination, and localization.

Path parameters:
- **hero_identifier**: Hero identifier as numeric hero ID or hero name. Accepts values like `30`, `Yi Sun-shin`, or `yisunshin`.

Query parameters:
- **lane**: Lane. Allowed values: `exp`, `mid`, `roam`, `jungle`, `gold`. from `/api/academy/heroes/{hero_identifier}/lane` 
- **rank**: Rank filter. Allowed values: `all`, `epic`, `legend`, `mythic`, `honor`, `glory`.
- **size**: Number of items per page (minimum: 1).
- **index**: Page index (starting from 1).
- **lang**: Language code for localized content (default: `en`).

The response includes hero lane time-based win rate data:
- **records**: Array of hero entries, each containing:
    - **_id**: Unique record identifier.
    - **_createdAt**: Creation timestamp.
    - **_updatedAt**: Last update timestamp.
    - **data**:
        - **heroid**: Hero ID.
        - **hero_name**: Hero name.
        - **real_road**: Lane ID (e.g., 4 for Jungle).
        - **total_win_rate**: Overall win rate for the hero in this lane.
        - **time_win_rate**: Array of segmented win rates by match duration:
            - **time_min**: Minimum time interval (minutes).
            - **time_max**: Maximum time interval (minutes).
            - **win_rate**: Win rate within that time range.

This endpoint is useful for:
- Analyzing hero performance progression over match duration.
- Understanding lane-specific strengths.
- Guiding players in timing strategies for optimal hero usage.

## Request

`GET https://arena.rone.dev/api/academy/heroes/{hero_identifier}/win-rate/timeline`

### Parameters

| Name | In | Type | Required | Default | Description |
| --- | --- | --- | --- | --- | --- |
| `hero_identifier` | path | string | yes |  | Hero identifier as numeric hero ID or hero name. Accepts values like `30`, `Yi Sun-shin`, or `yisunshin`. Name matching ignores spaces/symbols and is case-insensitive (e.g., `Luo Yi` to `luoyi`). |
| `lane` | query | string | yes |  | Filter heroes by lane `/api/academy/heroes/{hero_identifier}/lane`. One of: `exp`, `mid`, `roam`, `jungle`, `gold`. |
| `rank` | query | string | no | `all` | Rank filter for hero statistics. One of: `all`, `epic`, `legend`, `mythic`, `honor`, `glory`. |
| `size` | query | integer | no | `20` | Number of items per page. Range: 1... |
| `index` | query | integer | no | `1` | Page index for pagination. Range: 1... |
| `lang` | query | string | no | `en` | Language code for localized content. One of: `en`, `id`, `ru`, `es`, `pt`, `tr`, `ar`, `de`, `fr`, `it`, `ja`, `ko`, `th`, `vi`, `zh-CN`, `zh-TW`, `km`. |

### Example

```bash
curl -X GET 'https://arena.rone.dev/api/academy/heroes/{hero_identifier}/win-rate/timeline?lane=<lane>'
```

## Example response

```json
{
  "code": 0,
  "message": "OK",
  "data": {
    "records": [
      {
        "_createdAt": 1774890905268,
        "_id": "69caaf9b54ae2bda46ed0aeb",
        "_updatedAt": 1774890905268,
        "data": {
          "big_rank": "101",
          "hero_name": "\u68b5\u59ae",
          "heroid": 17,
          "real_road": 1,
          "time_win_rate": [
            {
              "time_max": 12,
              "time_min": 10,
              "win_rate": 0.3304550611370226
            }
          ],
          "total_win_rate": 0.4135894042088245
        },
        "id": 4234813,
        "sourceId": 2777027
      }
    ],
    "total": 1
  }
}
```

## Links

- Try it in the playground: https://arena.rone.dev/web/academy/heroes/{hero_identifier}/win-rate/timeline
- Academy endpoints: https://arena.rone.dev/web/academy.md
- OpenAPI schema: https://arena.rone.dev/api/openapi.json
